
import request from "@/request/request.js";



/**
 * 获取用户信息
 *
 */
export function getUserInfo() {
    return request.get('apicrzs/user/detail');
}



/**
 * 修改用户信息
 * @param object
 */
export function userEdit(data) {
    return request.put('apicrzs/user/edit', data);
}
/**
 * 获取小程序二维码
 *
 */
export function routineCode(data) {
    return request.get('apicrzs/user/routine_code', data);
}

/**
 * 注销用户
 * @param int id
 *
 */
export function cancelUser() {
    return request.get('apicrzs/user/cancel');
}
/**
 *
 * 小程序绑定手机号
 * @param object data
 */
export function mpBindingPhone(data) {
    return request.post('apicrzs/user/routine/binding_phone', data);
}

/**
 * 小程序绑定手机号
 * @param object data
 */
export function bindingUserPhone(data) {
    return request.put('apicrzs/user/binding', data);
}

/*
 * 获取隐私协议
 * */
export function getUserAgreement(type) {
    return request.get(`apicrzs/get_agreement`, {type:type}, {
        noAuth: true
    });
}

/*
 * 获取管理设备列表
 * */
export function getDeviceLists(data) {
    return request.get(`apicrzs/buy/spread/device/list`, data);
}

/*
 * 获取设备分润列表
 * */
export function getProfitsLists(data) {
    return request.get(`apicrzs/buy/spread/device/profits`, data);
}
